package com.kingschan.jeasytag.tag;
import javax.servlet.jsp.tagext.BodyTagSupport;
import com.kingschan.jeasytag.core.annotations.tag.*;
public class RootTag extends BodyTagSupport{
	private static final long serialVersionUID = 1L;
	@PropertyField
	@StringField(description="id")
	private String id;
	@PropertyField
	@StringField(description="name")
	private String name;
	@PropertyField
	@StringField(description="inital value")
	private String value;
	@PropertyField
	@StringField(description="css style")
	private String style;
	@PropertyField
	@StringField(description="jeasy data")
	private String easytagdata;	
	//private static Logger log = Logger.getLogger(RootTag.class);
	private EasyTag easytag;
	/**
	 *getSuport
	 * @param tag
	 * @return
	 */
	public EasyTag getSuport(){		
		if (null==pageContext.getAttribute("easytag")) {
			easytag= new EasyTag();
			pageContext.setAttribute("easytag", easytag);
			return easytag;
		}else{
			 easytag=(EasyTag) pageContext.getAttribute("easytag");
			return easytag;
		}
		
	}
	
	
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getStyle() {
		return style;
	}
	public void setStyle(String style) {
		this.style = style;
	}


	public String getEasytagdata() {
		return easytagdata;
	}

	public void setEasytagdata(String easytagdata) {
		this.easytagdata = easytagdata;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
}
